/*
 * Copyright (c) 2023 HiSilicon (Shanghai) Technologies CO., LIMITED.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Description: hcc adapt uart.
 * Create: 2023-09-19
 */

#ifndef HCC_ADAPT_UART_HEADER
#define HCC_ADAPT_UART_HEADER

#include "osal_types.h"
#include "hcc_bus_types.h"

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

typedef struct uart_packet_head_t {
    td_u8 packet_start;
    struct {
        td_u8 type : 3;
        td_u8 queue_id : 5;
    } packet_info;
    td_u8 len_h;
    td_u8 len_l;
} uart_packet_head;

hcc_bus *hcc_adapt_uart_load(td_void);
td_void hcc_adapt_uart_unload(td_void);

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif
